

<%@ page import="contas.Administrador" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'administrador.label', default: 'Administrador')}" />
        <title><g:message code="default.edit.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="Pagina Inicial"/></a></span>
            <span class="menuButton"><g:link class="list" action="show" id ="${administrador?.id}" ><g:message code="Voltar" args="[entityName]" /></g:link></span>
        </div>
        <div class="body">
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${administradorInstance}">
            <div class="errors">
                <g:renderErrors bean="${administradorInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${administradorInstance?.id}" />
                <g:hiddenField name="version" value="${administradorInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="login"><g:message code="administrador.login.label" default="Login" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: administradorInstance, field: 'login', 'errors')}">
                                    <g:textField name="login" maxlength="50" value="${administradorInstance?.login}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="senha"><g:message code="administrador.senha.label" default="Senha" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: administradorInstance, field: 'senha', 'errors')}">
                                    <g:passwordField name="senha" maxlength="15" value="${administradorInstance?.senha}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="email"><g:message code="administrador.email.label" default="Email" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: administradorInstance, field: 'email', 'errors')}">
                                    <g:textField name="email" maxlength="50" value="${administradorInstance?.email}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="telefone"><g:message code="administrador.telefone.label" default="Telefone" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: administradorInstance, field: 'telefone', 'errors')}">
                                    <g:textField name="telefone" maxlength="30" value="${administradorInstance?.telefone}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="nome"><g:message code="administrador.nome.label" default="Nome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: administradorInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" maxlength="50" value="${administradorInstance?.nome}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="tipo"><g:message code="administrador.tipo.label" default="Tipo" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: administradorInstance, field: 'tipo', 'errors')}">
                                    <g:textField name="tipo" value="${administradorInstance?.projeto}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value='Atualizar' onclick="return confirm('Tem certeza que deseja completar essa atualização?');" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value='Remover' onclick="return confirm('Tem certeza que deseja remover este usuario?');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
